package com.joe.admin.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import java.text.ParseException;

/**
 * @author Administrator
 */
@Controller
@RequestMapping("/layout")
public class ShowHomeController {

    private static final String GROUP = "DEFAULT";

    @RequestMapping("/showHome")
    public ModelAndView showHome(HttpServletRequest request) throws ParseException {
        ModelAndView mv = new ModelAndView("layout/home");
        return mv;
    }


    @RequestMapping("/showIndex")
    public ModelAndView showIndex(HttpServletRequest request) {
        String uName = request.getParameter("userName");
        ModelAndView modelAndView = new ModelAndView("layout/index");
        modelAndView.addObject("userName", uName);
        return modelAndView;
    }

    @RequestMapping("/showDemo")
    public ModelAndView showTest(HttpServletRequest request) {
        ModelAndView modelAndView = new ModelAndView("demo/demo");
        return modelAndView;
    }


}
